import java.util.Scanner;

public class ArrayReview {
    public static void main(String[] args) {
        int[] arr = {10, 20, 30, 40};

        Scanner input = new Scanner(System.in);

        //动态（运行时）确定数组的长度和元素的值
        System.out.print("请输入元素的个数：");
        int count = input.nextInt();

        int[] nums = new int[count];
        for(int i=0; i<nums.length; i++){
            nums[i] = (int)(Math.random()*100);
            System.out.print(nums[i]+" ");
        }

        input.close();
    }
}
